package ru.tapublog.lib.samsungwallet.impl.converter;

import ru.tapublog.lib.samsungwallet.api.model.Partner;
import ru.tapublog.lib.samsungwallet.impl.dao.PartnerDAO;
import ru.tapublog.lib.samsungwallet.impl.dao.PartnerDAO.Data;

public class PartnerConverter {
	public static PartnerDAO convert(Partner partner)
	{
		PartnerDAO pDao = new PartnerDAO();
		pDao.setId(partner.getId());
		PartnerDAO.Data data = new Data();
		data.setBanner(partner.getBanner().toString());
		data.setLink(partner.getLink().toString());
		data.setValidUntil(DateConverter.convertDateType(partner.getValidUntil()));
		pDao.setPartner(data);
		return pDao;
	}
}
